
<!doctype html>
<html>
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <link rel="stylesheet" href="../mycss/main.css"/>
    <link rel="stylesheet" href="../bootstrap-3.3.7-dist/css/bootstrap.css" media="screen"/>

    <link rel="stylesheet" href="../bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css" media="screen"/>
    <script src="../jquery/jquery-3.3.1.min.js"></script>
    <script src="../bootstrap-3.3.7-dist/js/bootstrap.js"></script>

    <script src="../bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js"></script>
    <script src="../bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <title>home</title>
</head>

<body>
<!--引用页面头部-->
<div>

    <!-- header-->
    <nav class="navbar navbar-inverse" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="home">租房系统</a>
            </div>
            <div>
                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            成都 <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="#">上海</a></li>
                            <li><a href="#">武汉</a></li>
                            <li><a href="#">西安</a></li>
                            <li><a href="#">北京</a></li>
                        </ul>
                    </li>
                    <li class="active"><a href="#">首页</a></li>
                    <li><a href="#">业主</a></li>
                </ul>
            </div>
            <div class="div-user">
                <ul class="nav navbar-nav">
                    <li>
                        <div class="div-avatar">
                            <a href="showUserInformation">
                                <img src="http://192.168.199.114:8132/images/avatar/5aa7913efacd911468a3735e.jpg" alt="avatar"/>
                            </a>
                        </div>
                    </li>
                    <li><a href="/showMyOrder" class="btn" data-toggle="modal">我的订单</a></li>
                    <li><a href="" class="btn" data-toggle="modal" data-target="#myModal-login">登录</a></li>
                    <li><a href="" class="btn" data-toggle="modal" data-target="#myModal-register">注册</a></li>
                    <li><a href="logout" >退出</a></li>
                </ul>
            </div>
        </div>
    </nav>
    <!-- header-->



    <!-- 登录框 -->
    <div class="modal fade" id="myModal-login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        x
                    </button>
                    <h4 class="modal-title" id="myModalLabel">
                        登录
                    </h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" role="form" action="login" method="post" id="form-login">
                        <div class="form-group">
                            <label for="account" class="col-sm-2 control-label">账号</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="account"
                                       placeholder="account" name="account" value="MasonSpring"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="password" class="col-sm-2 control-label">密码</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="password"
                                       placeholder="password" name="password" value="MasonSpring"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox" /> 请记住我
                                    </label>
                                </div>
                            </div>
                        </div>

                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                            </button>
                            <button type="submit" class="btn btn-primary" id="btn-login">
                                登录
                            </button>
                        </div>
                    </form>
                </div>

            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
    <!-- 登录框 -->

    <!-- 注册框 -->
    <div class="modal fade" id="myModal-register" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel-register">
                        注册
                    </h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" id="form-register" role="form">
                        <div class="form-group">
                            <label for="account-register" class="col-sm-2 control-label">账号</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="account-register"
                                       placeholder="account" name="account"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="password-register" class="col-sm-2 control-label">密码</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="password-register"
                                       placeholder="password" name="password" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="password-confirm-register" class="col-sm-2 control-label">密码确认</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="password-confirm-register"
                                       placeholder="password confirm" name="passwordConfirm"/>
                            </div>
                        </div>


                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                            </button>
                            <button type="button" class="btn btn-primary" id="btn-register">
                                注册
                            </button>
                        </div>
                    </form>
                </div>

            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
    <!-- 注册框 -->


<script type="text/javascript">
    $('.form_date').datetimepicker({
        format:'yyyy-mm-dd',
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0
    });



    $("#btn-update-informationVO").click(function () {
        $.ajax({
            type: 'post',
            url: 'updateInformation',
            data:$('#form-informationVO').serialize(),
            beforeSend: function (XMLHttpRequest) {

            },
            success: function (data) {
                alert(data);
            },
            complete: function (XMLHttpRequest, textStatus) {

            },
            error: function () {
            }
        });
    });

    $("#btn-register").click(function () {
        $.ajax({
            type: 'post',
            url: 'register',
            data:$('#form-register').serialize(),
            beforeSend: function (XMLHttpRequest) {

            },
            success: function (data) {
                alert(data);
            },
            complete: function (XMLHttpRequest, textStatus) {

            },
            error: function () {

            }
        });
    });


</script>
</div>
<!-- 个人信息 -->

<div class="">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
        &times;
    </button>
    <h4 class="modal-title">
        个人信息
    </h4>
</div>

<div class="modal-body">
    <tbody>
    <form enctype="multipart/form-data" class="form-horizontal" role="form" action="updateInformation" method="post">
        <tr>
            <td>
                <div class="form-group">
                    <label class="col-sm-2 control-label">头像:</label>
                    <div class="col-sm-5 ">
                        <input type="file" name="avatar"/>
                        <div class="div-avatar-big">
                            <img src="http://192.168.199.114:8132/images/avatar/5aa7913efacd911468a3735e.jpg" alt="avatar"/>
                        </div>
                        
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                    <label for="nickname" class="col-sm-2 control-label">昵称:</label>
                    <div class="col-sm-10" >
                        <input type="text" class="form-control" id="nickname" name="nickname" placeholder="nickname"
                               value="鸣人23" />
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                    <label for="sex1" class="col-sm-2 control-label">性别:</label>
                    <div>
                        <label class="radio-inline" for="sex1">
                            <input type="radio" id="sex1" name="sex" value="1"/>男
                        </label>
                        <label class="radio-inline" for="sex2">
                            <input type="radio" id="sex2" name="sex" value="0" checked="checked"/>女
                        </label>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                    <label  class="col-sm-2 control-label">生日:</label>
                    <div class="control-group">

                        <div class="controls input-append date form_date" data-date="" data-date-format="dd MM yyyy" data-link-field="dtp_input2" data-link-format="yyyy-mm-dd">
                            <input  size="16" type="text" value="2018-03-16" name="birthday"/>
                            <span class="add-on"><i class="icon-remove"></i></span>
                            <span class="add-on"><i class="icon-th"></i></span>
                        </div>
                        <input type="hidden" id="dtp_input2" value="" /><br/>
                    </div>
                </div>

            </td>
        </tr>
        <tr>
            <td>
                <div class="form-group">
                    <label for="address" class="col-sm-2 control-label">地址:</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="address" name="address" placeholder="address"
                               value="川大" />
                    </div>
                </div>

            </td>
        </tr>
        <tr>
            <td>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="submit" class="btn btn-primary" id="btn-update-informationVO">
                        修改
                    </button>
                </div>
            </td>
        </tr>
    </form>
    </tbody>
</div>
<script>
    $('.form_date').datetimepicker({
        format:'yyyy-mm-dd',
        language:  'zh-CN',
        weekStart: 1,
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        minView: 2,
        forceParse: 0
    });
</script>

</body>
</html>